package com.muli.muwai.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muli.muwai.entity.IntfAreaMessage;
import com.muli.muwai.entity.IntfFinProductionCost;
import com.muli.muwai.mapper.AreaMessageMapper;
import com.muli.muwai.service.AreaMessageService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class AreaMessageServiceImpl extends ServiceImpl<AreaMessageMapper, IntfAreaMessage>implements AreaMessageService {
    @Override
    public void areaMessage(List<String[]> areaMessage) {

        List<IntfAreaMessage> list = new ArrayList<>();
        for (String[] strings : areaMessage) {
            IntfAreaMessage entity = new IntfAreaMessage();
            entity.setType(strings[0]);
            entity.setCountry(strings[1]);
            entity.setCoding(strings[2]);
            entity.setTopName(strings[3]);
            entity.setTopCoding(strings[4]);
            entity.setEnglist(strings[5]);
            entity.setFontChinese(strings[6]);
            list.add(entity);
        }
        saveBatch(list);

    }
}
